package ru.nosport.matrixaria.modules.core.rmh;

import ru.nosport.matrixaria.core.MessageHandlerException;

import java.net.InetSocketAddress;

/**
 * RemoteMessageHandler interface describes methods to be used for implementing remote communication
 * modules. They should provide access to remote core modules.
 *<pre>
 * User: vfabr
 * Date: 25.10.2006
 * Time: 13:05:43
 *</pre>
 */
public interface RemoteMessageHandler {

	/**
	 * Common method for accessing remote methods.
	 *
	 * @param _isa	Remote server socket object.
	 * @param _name   Remote object name
	 * @param _method Method name to be called
	 * @param _params Method parameters array
	 *
	 * @return Execution result
	 *
	 * @throws MessageHandlerException if error occurs.
	 */
	public Object sendMessage(InetSocketAddress _isa, String _name, String _method, Object[] _params) throws MessageHandlerException;

}
